{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "6cc4af75",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "1+1\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "60862398",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "d9849536",
   "metadata": {},
   "source": [
    "# 一级标题"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "965ce7f2",
   "metadata": {},
   "source": [
    "## 二级标题"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f6e4aa93",
   "metadata": {},
   "source": [
    "#### 四级标题"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "3fe00c05",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n"
     ]
    }
   ],
   "source": [
    "print ('hello world')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "55fa9cb1",
   "metadata": {},
   "source": [
    "##print\n",
    "python中输出的函数，用来打印的值"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "575cff81",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "床前明月光，\n",
      "疑是地上霜。\n",
      "举头望明月，\n",
      "低头思故乡。\n"
     ]
    }
   ],
   "source": [
    "s = '''床前明月光，\n",
    "疑是地上霜。\n",
    "举头望明月，\n",
    "低头思故乡。'''\n",
    "print(s)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "f4e493d0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'0.0'"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "str(0.)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "5ec0caa5",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入一个整数5\n",
      "7\n"
     ]
    }
   ],
   "source": [
    "num = input('请输入一个整数')\n",
    "result = int(num) + 2\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "d49084ab",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid character in identifier (<ipython-input-14-20592e4fd3a6>, line 2)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-14-20592e4fd3a6>\"\u001b[1;36m, line \u001b[1;32m2\u001b[0m\n\u001b[1;33m    result = float（'num'） +1\u001b[0m\n\u001b[1;37m                  ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid character in identifier\n"
     ]
    }
   ],
   "source": [
    "num = input('请输入一个浮点数')\n",
    "result = float（'num'） +1\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "b2b80da2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入一个浮点数:2.2\n",
      "3.2\n"
     ]
    }
   ],
   "source": [
    "num = input('请输入一个浮点数:')\n",
    "result = float(num) +1\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "e1ba9182",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-18-f132f563d4ea>, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-18-f132f563d4ea>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m    radius input('请输入半径')\u001b[0m\n\u001b[1;37m           ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "radius input('请输入半径')\n",
    "pai=3.14\n",
    "zc=2*pai*float(radius)\n",
    "print(zc)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "4107261b",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-19-7e1be952f0b3>, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-19-7e1be952f0b3>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m    radius input('请输入半径')\u001b[0m\n\u001b[1;37m           ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "radius input('请输入半径')\n",
    "pai=3.14\n",
    "zc=2 * pai *  float(radius)\n",
    "print(zc)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "0698f157",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入姓名liuliu\n"
     ]
    },
    {
     "ename": "NameError",
     "evalue": "name 'address' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-20-c512a1c7aea0>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[0ms\u001b[0m\u001b[1;33m=\u001b[0m \u001b[1;34m'欢迎%s光临%s'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[0mname\u001b[0m\u001b[1;33m=\u001b[0m \u001b[0minput\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'请输入姓名'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0maddress\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'泽林'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      4\u001b[0m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ms\u001b[0m \u001b[1;33m%\u001b[0m \u001b[1;33m(\u001b[0m\u001b[0mname\u001b[0m\u001b[1;33m,\u001b[0m\u001b[0maddress\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'address' is not defined"
     ]
    }
   ],
   "source": [
    "s= '欢迎%s光临%s'\n",
    "name= input('请输入姓名')\n",
    "address('泽林')\n",
    "print(s % (name,address))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "9e788faa",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入姓名pengpeng\n",
      "欢迎pengpeng光临泽林\n"
     ]
    }
   ],
   "source": [
    "s= '欢迎%s光临%s'\n",
    "name= input('请输入姓名')\n",
    "address=('泽林')\n",
    "print(s % (name,address))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "502bf06c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为%b 65\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为%b',65)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "0458dd10",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:65\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%d' % 65)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "ebfc278d",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-26-b96a6a9547fa>, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-26-b96a6a9547fa>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m    print('你的体重为:%d',% '65')\u001b[0m\n\u001b[1;37m                     ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%d',% '65')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "7a0aa4bd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:65\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%s'% '65')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "82c334ce",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:66\n"
     ]
    }
   ],
   "source": [
    "a = 66\n",
    "print('你的体重为:%d' % a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "16a182cc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:1\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%d' % True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "aaa93b1b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:0\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%d' % False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "bd3fcbb1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:65, 你的身高为:66\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%d, 你的身高为:%d' % (65,66))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "2fe05f0c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:65, 你的身高为:67\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%d, 你的身高为:%d' % (65,67))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "c5b0eacc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的体重为:65.000000\n"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%f'  % 65) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "id": "138756aa",
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "must be real number, not str",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-145-b03466ca2a32>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'你的体重为:%f'\u001b[0m  \u001b[1;33m%\u001b[0m \u001b[1;34m'65'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: must be real number, not str"
     ]
    }
   ],
   "source": [
    "print('你的体重为:%f'  % '65') "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "1c72c06a",
   "metadata": {},
   "outputs": [],
   "source": [
    "string = ('python is good')\n",
    "print(string[20])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "id": "262c162f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5\n"
     ]
    }
   ],
   "source": [
    "str_b='abcde123456'\n",
    "print(str_b[len(str_b)-13])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 151,
   "id": "d98b844a",
   "metadata": {},
   "outputs": [
    {
     "ename": "IndexError",
     "evalue": "string index out of range",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mIndexError\u001b[0m                                Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-151-42b035fd1686>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[0mstr_b\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m'abcde123456'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mstr_b\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m13\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mIndexError\u001b[0m: string index out of range"
     ]
    }
   ],
   "source": [
    "str_b='abcde123456'\n",
    "print(str_b[13])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "8332dc5d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "doog si nohtyP\n"
     ]
    }
   ],
   "source": [
    "string = 'Python is good'\n",
    "print(string[::-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "id": "6be511bc",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (<ipython-input-161-4bc154566397>, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-161-4bc154566397>\"\u001b[1;36m, line \u001b[1;32m1\u001b[0m\n\u001b[1;33m    print(==========我的名片=======)\u001b[0m\n\u001b[1;37m          ^\u001b[0m\n\u001b[1;31mSyntaxError\u001b[0m\u001b[1;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "print(==========我的名片==========)\n",
    "input(姓名：itheima )\n",
    "input(qq：xxxxxxxxx )\n",
    "input手机号：11011912011 )\n",
    "input公司地址：北京市xxxxxx)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "id": "cf3aa670",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "==========我的名片==========\n",
      "姓名：itheima \n",
      "qq：xxxxxxxx\n",
      "手机号：11011912011 \n",
      "公司地址：北京市xxxxx\n",
      "============================\n",
      "\n"
     ]
    }
   ],
   "source": [
    "s='''==========我的名片==========\n",
    "姓名：itheima \n",
    "qq：xxxxxxxx\n",
    "手机号：11011912011 \n",
    "公司地址：北京市xxxxx\n",
    "============================\n",
    "'''\n",
    "print(s)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b40a9542",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "608568a0",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入你的姓名:\n",
      "请输入你的账号\n",
      "请输入你的手机号\n"
     ]
    }
   ],
   "source": [
    "a='''==========我的名片==========\n",
    "    姓名:%s\n",
    "    qq:%s\n",
    "    手机号：185%s\n",
    "    地址:北京市:%s\n",
    "    '''\n",
    "b=input('请输入你的姓名:')\n",
    "c=input('请输入你的账号')\n",
    "d=input('请输入你的手机号')\n",
    "e=input('请输入你的的地址:')\n",
    "\n",
    "print(a  %(b,c,d,e) )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "74ce19dc",
   "metadata": {},
   "outputs": [],
   "source": [
    "a='''==========我的名片==========\n",
    "    姓名:%s\n",
    "    qq:%s\n",
    "    手机号:185%s\n",
    "    公司地址：北京市%s\n",
    "=============================\n",
    " '''\n",
    "print(a  %('thankyou',110120119,19512769,'龙华区泽林'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "bc0b05f0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "sagf saga\n"
     ]
    }
   ],
   "source": [
    "print('sagf','saga')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "40a31d48",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f42f7c5e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "abxdefg\n",
      "asdfg\n"
     ]
    }
   ],
   "source": [
    "a='''abxdefgb\n",
    "asdfg'''\n",
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "20e7e4b0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入数值a:3\n",
      "请输入数值b:4\n",
      "3+4= 7\n",
      "3-4= -1\n",
      "3*4= 12\n",
      "3/4= 0.75\n",
      "3%4= 3\n",
      "3**4= 81\n"
     ]
    }
   ],
   "source": [
    "a=int(input('请输入数值a:'))\n",
    "b=int(input('请输入数值b:'))\n",
    "print('3+4=',a+b)\n",
    "print('3-4=',a-b)\n",
    "print('3*4=',a*b)\n",
    "print('3/4=',a/b)\n",
    "print('3%4=',a%b)\n",
    "print('3**4=',a**b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "4889936b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入一个数4\n",
      "4是偶数\n"
     ]
    }
   ],
   "source": [
    "a=input('请输入一个数')\n",
    "if int(a)%2==0:\n",
    "    print(str(a)+'是偶数')\n",
    "else:\n",
    "    print(str(a)+'是奇数')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "607af106",
   "metadata": {},
   "outputs": [],
   "source": [
    "input('请输入用户名')\n",
    "input('请输入密码')\n",
    "if \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "7c1413cc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入一个整数:3\n",
      "3 是奇数\n"
     ]
    }
   ],
   "source": [
    "num =int(input('请输入一个整数:'))\n",
    "if num % 2 == 0:\n",
    "    print('%d 是偶数' % num)\n",
    "else:\n",
    "    print('%d 是奇数' % num)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "f4fcd3e0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入用户名:1234\n",
      "请输入密码:123456\n",
      "身份验证失败\n"
     ]
    }
   ],
   "source": [
    "user=input('请输入用户名:')\n",
    "passwd=input('请输入密码:')\n",
    "if user == 'admim' and passwd =='123456':\n",
    "    print('身份验证成功')\n",
    "else:\n",
    "    print('身份验证失败')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "6ea4e24f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入一个数:7\n",
      "不是3的倍数\n"
     ]
    }
   ],
   "source": [
    "a=int(input('请输入一个数:'))\n",
    "if a%3 ==0:\n",
    "    print('是3的倍数')\n",
    "else:\n",
    "    print('不是3的倍数')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "id": "95dddffd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "请输入一个数7\n",
      "猜对了\n"
     ]
    }
   ],
   "source": [
    "a=7\n",
    "b=int(input('请输入一个数'))\n",
    "if a==b:\n",
    "    print('猜对了')\n",
    "elif b>a:\n",
    "    print('太大了')\n",
    "elif a>b:\n",
    "    \n",
    "    print('太小了')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "id": "620c1821",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正常\n"
     ]
    }
   ],
   "source": [
    "bmi =80 / (1.75 **2)\n",
    "if bmi <18.5:\n",
    "    print('过轻')\n",
    "elif 18.5 <=bmi >25:\n",
    "    print('正常')\n",
    "elif 25 >= bmi<28:\n",
    "    print('过胖')\n",
    "elif 30>=bmi >32:\n",
    "    print('肥胖')\n",
    "else:\n",
    "    print('严重肥胖')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "id": "e4b5eba3",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "5050\n"
     ]
    }
   ],
   "source": [
    "a=0\n",
    "for i in range(101):\n",
    "    a=a+i\n",
    "print(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7d0402d8",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
